#ifndef C_VECTOR
#define C_VECTOR
#include <iostream>
#include "Point.h"

using namespace std;

class Vector : public Point
{
	public:
		Vector (){x = 0.0; y = 0.0; z = 0.0;}
		Vector (double n1, double n2, double n3){x = n1; y = n2; z = n3; t = 0.0;}
		Vector (const Vector &v){x = v.get_x(); y = v.get_y(); z = v.get_z(); t = 0.0;}
		Vector (const Point &, const Point &);
		
		Vector operator^(const Vector &) const;
		Vector operator+(const Vector &) const;
		bool operator==(const Vector &) const;
		void operator=(const Vector &);
		Vector operator*(const double &a) const{Vector res = Vector(x*a, y*a, z*a); return res;}
		double operator*(const Point &p) const{ return(x*p.get_x() + y*p.get_y() + z*p.get_z() + t*p.get_t());}	
		void display() const;

		double norm();
		double scalar(const Vector &) const;
		void normalize();
		void inverse(){x=-x; y=-y; z=-z;}

		Point operator+(const Point &p) const
		{ 
			Point res = Point();
			res.set_x(x+p.get_x());
			res.set_y(y+p.get_y());
			res.set_z(z+p.get_z());
			return res;
		}

		Vector operator- (const Vector& v)const
		{
			Vector res= Vector();
			res.set_x(x-v.get_x());
			res.set_y(y-v.get_y());
			res.set_z(z-v.get_z());
			return res;
		}
};

#endif
